package com.hospital.spd.controller;

import com.hospital.spd.pojo.*;
import com.hospital.spd.service.PaginationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 97261
 */
@RestController
@RequestMapping(value = "/export")
public class PaginationController {

    @Autowired
    PaginationService paginationService;

    @GetMapping("/goods-used")
    public PaginationResultVO<GoodsUsedQtyDO> goodsUsedQtyPaginationResult(PaginationRequestParamsQuery requestParams) {
        System.out.println(requestParams);
        return paginationService.pageView(requestParams);
    }


    @GetMapping("/delivery-time")
    public PaginationResultVO<SupplierDeliveryTimeSurveyDO> deliveryTime(DeliveryTimeRequestParamsQuery requestParams) {
        System.out.println(requestParams);
        return paginationService.deliveryTime(requestParams);
    }

}
